<html>
<head>
<script type = "text/javascript">
function confirm_me(){
	//alert("woot");
	return confirm("Are you sure you want to delete these surveys?");

}
</script>
</head>
<body>
<?php
	echo "<h2>";
	echo "Delete Survey";
	echo "</h2>";
?>

<form method="POST" action='http://localhost/pollwatcher/index.php/user/actual_survey_delete/' onsubmit="return confirm_me()">
<?php
	//echo anchor('user/view_certain_survey/'.$id,'Sample survey lang to');

	//echo form_open('user/actual_survey_delete'); ito un

	//echo form_open('user/actual_survey_delete/'.$survey_id);
	$index = 0;
	foreach($surveys->result() AS $test){
		//echo form_checkbox('survey', 'checked', FALSE);
		$survey_id = $test->survey_id;
		$title = $test->title;
		$id = "chkDel".$index;
		echo "<input type='checkbox' id=\"$id\" name='survey[]' value='$survey_id'>";
		echo "<label for=\"$id\">";
		echo "                   ";
		echo $title;
		echo "</label>";
		echo "<br/>";
		$index++;
	}

	echo "<br />";
	//echo form_button('edit', 'Delete me!');


	//echo anchor('user/invite_resp','Invite others');
		
	//query
	//
	if ($surveys->num_rows == 0){		
	}
	else{
		echo "<input type='submit' class = 'reg' name='delete'  value='Delete Survey'>"; 
	}

?>
</body>
</html>





